#include "HardwareInfo.h"

#include <unistd.h>

/*
	HardwareInfo
*/

/*	public	*/

HardwareInfo& HardwareInfo::getInstance() {
	if (_instance == 0) {
		_instance = new HardwareInfo();
	}

	return *_instance;
}

int HardwareInfo::getCpuCount() const {
	return sysconf(_SC_NPROCESSORS_CONF);
}

/*	private	*/

HardwareInfo* HardwareInfo::_instance = 0;

